package com.ruoyi.datastatistics.controller;

import com.ruoyi.common.core.domain.Parameter;
import com.ruoyi.datastatistics.domain.AgegroupResult;
import com.ruoyi.datastatistics.service.PassrateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


@RestController
@RequestMapping("/passrate")
public class PassrateController {
    @Autowired
    private PassrateService passrateService;

    //合格率统计——总体合格率
    @PostMapping("/getTotalpassrate")
    public Map<String,Object> getTotalpassrate(@RequestBody Parameter parameter){
        return passrateService.getTotalpassrate(parameter);
    }

    //合格率统计——年龄组
    @PostMapping("/getAgegrouppassrate")
    public Map<String,Object> getAgegrouppassrate(@RequestBody Parameter parameter){
        return passrateService.getAgegrouppassrate(parameter);
    }

    //合格率统计——年龄段
    @PostMapping("/getAgebracketpassrate")
    public Map<String,Object> getAgebracketpassrate(@RequestBody Parameter parameter){
        return passrateService.getAgebracketpassrate(parameter);
    }

    //合格率统计——城乡工作种类
    @PostMapping("/getUrbanandruralpassrate")
    public Map<String,Object> getUrbanandruralpassrate(@RequestBody Parameter parameter){
        return passrateService.getUrbanandruralpassrate(parameter);
    }

    //合格率统计——月份
    @PostMapping("/getMonthpassrate")
    public Map<String,Object> getMonthpassrate(@RequestBody Parameter parameter){
        return passrateService.getMonthpassrate(parameter);
    }

    //合格率统计——下一机构
    @PostMapping("/getNextdeptpassrate")
    public Map<String,Object> getNextdeptpassrate(@RequestBody Parameter parameter){
        return passrateService.getNextdeptpassrate(parameter);
    }
}
